package com.neusoft.sysdata.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.neusoft.sysdata.entity.MdDept;
import com.neusoft.sysdata.mapper.MdDeptMapper;
import com.neusoft.sysdata.service.IMdDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: MD_DEPT
 * @Author: jeecg-boot
 * @Date: 2019-12-09
 * @Version: V1.0
 */
@Service
@DS("slave")
public class MdDeptServiceImpl extends ServiceImpl<MdDeptMapper, MdDept> implements IMdDeptService {

    @Autowired
    private MdDeptMapper mdDeptMapper;

    /**
     * 获取部门信息（企业id）
     */
    @Override
    public List<MdDept> selectDeptInfo(String code, String pid) {
        return this.mdDeptMapper.selectDeptInfo(code, pid);
    }

    /**
     * 获取部门信息（企业id）
     */
    @Override
    public List<MdDept> selectComDeptInfo(String code, String pid) {
        return this.mdDeptMapper.selectComDeptInfo(code, pid);
    }

    /**
     * 获取部门信息（父级id）
     */
    @Override
    public List<MdDept> selectPDeptInfo(String code) {
        return this.mdDeptMapper.selectPDeptInfo(code);
    }
}
